﻿@model MISMVC.DAO.Model.Project

@{
	ViewBag.Title = "Create";
}
@section Scripts {
	@Scripts.Render( "~/bundles/jqueryval" )
}

<div class="row">
	<div class="">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">Create Project</h3>
			</div>
			<div class="panel-body">
				@using( Html.BeginForm( ) ) {
					@Html.AntiForgeryToken( )
						@Html.ValidationSummary( true , "" , new { @class = "text-danger" } )
					<fieldset>
						<div class="form-group">
								@Html.EditorFor( model => model.ProjectCode , new { htmlAttributes = new { @class = "form-control",@placeholder="Project Code" } } )
								@Html.ValidationMessageFor( model => model.ProjectCode , "" , new { @class = "text-danger" } )
						</div>

						<div class="form-group">
								@Html.EditorFor( model => model.Name , new { htmlAttributes = new { @class = "form-control" ,@placeholder="Project Name"} } )
								@Html.ValidationMessageFor( model => model.Name , "" , new { @class = "text-danger" } )
						</div>

						<div class="form-group">
								@Html.EditorFor( model => model.Description , new { htmlAttributes = new { @class = "form-control",@placeholder="Description" } } )
								@Html.ValidationMessageFor( model => model.Description , "" , new { @class = "text-danger" } )
						</div>

						<div class="form-group">
								@Html.EditorFor( model => model.DocumentGroupID , new { htmlAttributes = new { @class = "form-control" ,@placeholder="Document Group Name"} } )
								@Html.ValidationMessageFor( model => model.DocumentGroupID , "" , new { @class = "text-danger" } )
						</div>

						<div class="form-group">
							<div class="col-md-2 col-sm-2">
								@Html.ActionLink( "Back" , "Index" , null , new { @class = "glyphicon glyphicon-backward btn btn-default " } )
							</div>
							<div class="col-md-2 col-sm-2">
								<input type="submit" value="Create" class="btn btn-default" />
							</div>
						</div>

						@if( ViewBag.Error != null ) {
							<div class="form-group">
								=<span>@ViewBag.Error</span>
							</div>
						}
						</fieldset>
				}
			</div>
		</div>
	</div>
</div>
